<template>
    <div class="dashboard-container">

  
      <!-- Main Content -->
      <div class="main-content">
        <!-- Header -->
        <div class="header">
          <el-tabs v-model="activeTab">
            <el-tab-pane label="概览" name="overview"></el-tab-pane>
            <el-tab-pane label="制定追踪" name="executionTracking"></el-tab-pane>
            <el-tab-pane label="执行分析" name="executionAnalysis"></el-tab-pane>
            <el-tab-pane label="结果统计" name="resultsAnalysis"></el-tab-pane>
          </el-tabs>
          
          <div class="header-right">
            <el-select v-model="selectedCompany" placeholder="未命名企业">
              <el-option label="未命名企业" value="1"></el-option>
            </el-select>
            
            <el-select v-model="selectedYear" placeholder="2024年">
              <el-option label="2024年" value="2024"></el-option>
            </el-select>
          </div>
        </div>
  
        <component :is="activeTab"></component>
      </div>
    </div>
  </template>
  
  <script>
  import overview from './components/overview.vue'
  import executionTracking from './components/executionTracking.vue'
  import executionAnalysis from './components/executionAnalysis.vue'
  import resultsAnalysis from './components/resultsAnalysis.vue'
  export default {
    name: 'GoalsDashboard',
    components: {
        overview,
        executionTracking,
        executionAnalysis,
        resultsAnalysis
    },
    data() {
      return {
        activeTab: 'overview',
        selectedCompany: '1',
        selectedYear: '2024',
      }
    }
  }
  </script>
  
  <style scoped>
  .dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: #f7f8fa;
  }
  
  .sidebar {
    width: 200px;
    background-color: #f7f8fa;
    border-right: 1px solid #ebeef5;
  }
  
  .sidebar-menu {
    border-right: none;
  }
  
  .main-content {
    flex: 1;
    padding: 24px;
  }
  
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }
  
  .header-right {
    display: flex;
    gap: 12px;
  }
  
  .metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  
  .metric-card {
    border-radius: 8px;
  }
  
  .metric-content {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  
  .icon-container {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .icon-container i {
    font-size: 24px;
    color: white;
  }
  
  .blue {
    background-color: #409EFF;
  }
  
  .green {
    background-color: #67C23A;
  }
  
  .purple {
    background-color: #909399;
  }
  
  .red {
    background-color: #F56C6C;
  }
  
  .metric-info {
    flex: 1;
  }
  
  .metric-title {
    font-size: 14px;
    color: #606266;
    margin-bottom: 4px;
  }
  
  .metric-value {
    font-size: 24px;
    font-weight: bold;
    color: #303133;
  }
  
  .progress-content {
    display: flex;
    justify-content: center;
    padding: 24px 0;
  }
  
  .progress-label {
    font-size: 20px;
    font-weight: bold;
  }
  
  .progress-title {
    font-size: 14px;
    color: #909399;
    font-weight: normal;
    margin-top: 8px;
  }
  
  :deep(.el-select) {
    width: 140px;
  }
  
  :deep(.el-tabs__nav-wrap::after) {
    height: 1px;
  }
  
  :deep(.el-progress__text) {
    font-size: 20px !important;
  }
  </style>